package start.doubudouyin.utils;

public class Idgenerate {
    public static void main(String[] args) {
        System.out.println(userIdgenerate(1));
        System.out.println(videoIdgenerate(2));
        System.out.println(commentIdgenerate(3));
    }
    //生成用户id
    public static String userIdgenerate(Integer num){
        String userregisternum = String.format("%03d", num);
        return Time.getTimestamp()+userregisternum;
    }
    //生成视频id
    public static String videoIdgenerate(Integer num){
        String videoregisternum = String.format("%04d", num);
        return Time.getTimestamp()+videoregisternum;
    }
    //生成评论id
    public static String commentIdgenerate(Integer num){
        String commentnum = String.format("%05d", num);
        return Time.getTimestamp()+commentnum;
    }
}
